//基本调用，不限次数
function sendAxios(URL){
    return axios({
        url:URL,
        headers: { 
        }
    }).then(response=>{
        return response.data;
    }).catch(function (error) {  
        console.log(error);  
    });
}
//刷新调用，防止重复请求
let sending = null;
function sendingAxios(URL){
    if (!sending){
        sending = URL;
        return axios({
            url:URL,
            headers: { 
            }
        }).then(response=>{
            sending = null;
            return response.data;
        }).catch(function (error) {  
            sending = null;
            console.log(error);  
        });
    }else{
        return null
    }
}
//向index.html发送信息函数
function sendMessage(ID,Number) {  
    const parentWindow = window.parent;  
    parentWindow.postMessage({ type: 'details', id:ID ,number:Number}, '*');  
}
function sendInformation(url) {  
    const parentWindow = window.parent;  
    parentWindow.postMessage({ type: 'hot',URL:url}, '*');  
}
function openingOrder(number) {  
    const parentWindow = window.parent;  
    parentWindow.postMessage({ type: 'order',Number:number}, '*');  
}
